package com.mall.seckill_mall.dao;

import com.mall.seckill_mall.entity.Goods;
import com.mall.seckill_mall.vo.GoodsList;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GoodsDao {
    int insertOne(@Param("goods") Goods goods); //
    int deleteOne(@Param("goodsId") String goodsId); //
    int updateOne(@Param("goods") Goods goods); //
    List<GoodsList> selectOnlyUp(); //
    List<GoodsList> selectSalersGoods(@Param("userId") String userId); //
    Goods selectOne(@Param("goodsId") String goodsId); //
    int reduceStock(@Param("goodsId") String goodsId);
    int addStock(@Param("goodsId") String goodsId);
    int reduceCachedStock(@Param("goodsId") String goodsId);
    int addCachedStock(@Param("goodsId") String goodsId);
}
